// 基础属性接口
export interface BaseProps {
    [key: string]: any
}

// 组件类型枚举
export enum ComponentType {
    // 表单组件
    FORM_INPUT = 'form-input',
    FORM_SELECT = 'form-select',
    FORM_RADIO = 'form-radio',
    FORM_CHECKBOX = 'form-checkbox',
    FORM_SWITCH = 'form-switch',
    FORM_SLIDER = 'form-slider',
    FORM_UPLOAD = 'form-upload',
    FORM_RATE = 'form-rate',
    FORM_COLOR_PICKER = 'form-color-picker',
    FORM_TIME_PICKER = 'form-time-picker',
    FORM_DATE_PICKER = 'form-date-picker',
    FORM_DATE_TIME_PICKER = 'form-date-time-picker',
    FORM_CASCADER = 'form-cascader',
    FORM_TRANSFER = 'form-transfer',
    
    // 布局组件
    LAYOUT_TABS = 'layout-tabs',
    LAYOUT_GRID = 'layout-grid',
    LAYOUT_CARD = 'layout-card',
    
    // 数据展示组件
    DISPLAY_TABLE = 'display-table',
    DISPLAY_LIST = 'display-list',
    DISPLAY_DESCRIPTION = 'display-description',
    
    // 导航组件
    NAV_MENU = 'nav-menu',
    NAV_TABS = 'nav-tabs',
    NAV_BREADCRUMB = 'nav-breadcrumb',
    
    // 功能组件
    FEATURE_UPLOAD = 'feature-upload',
    FEATURE_RICH_TEXT = 'feature-rich-text',
    
    // 商品相关组件
    PRODUCT_CARD = 'product-card',
    PRODUCT_LIST = 'product-list',
    PRODUCT_DETAIL = 'product-detail',

    // 远程组件
    REMOTE_INPUT = 'remote-input',
    REMOTE_LINK = 'remote-link',
}

// 组件分类
export enum ComponentCategory {
    FORM = 'form',
    LAYOUT = 'layout',
    DISPLAY = 'display',
    NAVIGATION = 'navigation',
    FEATURE = 'feature',
    PRODUCT = 'product',
    BASIC = 'basic',
}

// 组件实例接口
export interface ComponentInstance {
    id: string
    type: ComponentType
    category: ComponentCategory
    props: {
        base: Record<string, any>
        style: Record<string, any>
        [key: string]: any
    }
    children?: ComponentInstance[]
    parentId?: string
    sort: number
}

// 页面配置接口
export interface PageConfig {
    components: ComponentInstance[]
    formData: Record<string, any>
    validation: Record<string, boolean>
    layout: {
        type: string
        gutter: number
        responsive: boolean
    }
    settings: {
        theme: string
        responsive: boolean
        spacing: {
            padding: string
            margin: string
        }
    }
} 